package com.gomoku.matchingsystem.service.impl;

import com.gomoku.matchingsystem.service.MatchingService;
import com.gomoku.matchingsystem.service.impl.utils.MatchingPool;
import org.springframework.stereotype.Service;

@Service
public class MatchingServiceImpl implements MatchingService {
    public final static MatchingPool matchingPool = new MatchingPool();
    @Override
    public String addPlayer(Integer userId,Integer rating,Integer bot_id) {
        System.out.println("addUser id:"+userId+" rating:"+rating+" bot_id:"+bot_id);
        matchingPool.addPlayer(userId,rating,bot_id);
        return "add success!";
    }

    @Override
    public String removePlayer(Integer userId) {
        System.out.println("remove userId"+userId);
        matchingPool.removePlayer(userId);
        return "remove user:"+userId;
    }
}
